package com.feiyun.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.PastOrPresent;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

/**
 * @ClassName excle 上传信息
 * @author: xingming
 * @Description:
 * @time 2023/04/02 21:57:55
 * @Version 1.0
 */

@Setter
@Getter
@ApiModel(value = "用户实体类", description = "定义用户的所有属性")
@TableName("t_wx_upload_user")
public class UploadUserInfo {

    @ApiModelProperty("uuid")
    @TableId
    private String uuid;

    @ApiModelProperty("电话号码")
    @TableField
    @Pattern(regexp = "^[0-9]{11}$", message = "电话号码格式错误")
    private String phoneNumber;

    @ApiModelProperty("用户姓名")
    @TableField
    @Length(max = 64, message = "姓名过长")
    private String name;

    @ApiModelProperty("用户性别")
    @TableField
    private Boolean gender;

    @ApiModelProperty("用户年龄")
    @TableField
    @Range(min = 0, max = 80, message = "无效的年龄")
    private Byte age;

    @ApiModelProperty("用户工作")
    @TableField
    @Length(max = 64, message = "工作描述过长")
    private String occupation;

    @ApiModelProperty("用户户籍地址")
    @TableField
    @Length(max = 255, message = "地址信息过长")
    private String baseAddress;

    @ApiModelProperty("用户现居地址")
    @TableField
    @Length(max = 255, message = "地址信息过长")
    private String currentAddress;

    @ApiModelProperty("是否离异")
    @TableField
    @Range(min = 0, max = 2, message = "无效的婚姻状态")
    //是否离异，0表示未婚，1表示已离异，2表示丧偶
    private Byte isDivorced;

    @ApiModelProperty("学位")
    @TableField
    @Range(max = 64, message = "学位描述过长")
    private String education;

    @ApiModelProperty("体重")
    @TableField
    @Range(min = 1, max = 120, message = "无效的体重")
    private Byte weight;

    @ApiModelProperty("身高")
    @TableField
    @Range(min = 100, max = 250, message = "无效的身高")
    private Short height;

    @ApiModelProperty("有车")
    @TableField
    private Boolean hasCar;

    @ApiModelProperty("有房")
    @TableField
    private Boolean hasHouse;

    @ApiModelProperty("民族")
    @TableField
    @Range(max = 64, message = "民族描述过长")
    private String nation;

    @ApiModelProperty("年薪")
    @TableField
    @Range(min = 1, max = 1000, message = "无效的收入")
    private Short income;

    @ApiModelProperty("自我评价")
    @TableField
    @Range(max = 500, message = "自我评价描述过长")
    private String personality;

    @ApiModelProperty("理想型")
    @TableField(value = "ideal_type")
    @Range(max = 500, message = "理想型 ")
    private String idealType;

    @ApiModelProperty("朋友的评价")
    @TableField(value = "friend_evaluation")
    @Range(max = 500, message = "自我评价描述过长")
    private String friendEvaluation;

    @ApiModelProperty("信息来源")
    @TableField
    private String sourceFrom;

    @ApiModelProperty("创建时间")
    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @PastOrPresent
    private LocalDateTime createTime;

    @ApiModelProperty("创建时间")
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @PastOrPresent
    private LocalDateTime updateTime;

    @ApiModelProperty("fileId")
    @TableField(value = "file_id")
    private String fileId;
}
